package com.pfa.test.metier;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.pfa.test.dao.IManagerDao;
import com.pfa.test.entities.ClientDsi;
import com.pfa.test.entities.DemandeReparation;
import com.pfa.test.entities.Intervenant;

@Transactional
public class ManagerMetierImpl implements IManagerMetier {

	private IManagerDao dao;
	
	
	
	public void setDao(IManagerDao dao) {
		this.dao = dao;
	}

	@Override
	public void ajouterClient(ClientDsi cli) {
		// TODO Auto-generated method stub
		dao.ajouterClient(cli);
	}

	@Override
	public void supprimerClient(Long cli) {
		// TODO Auto-generated method stub
		dao.supprimerClient(cli);
	}

	@Override
	public List<ClientDsi> listClient() {
		// TODO Auto-generated method stub
		return dao.listClient();
	}

	@Override
	public ClientDsi getClient(Long cli) {
		// TODO Auto-generated method stub
		return dao.getClient(cli);
	}

	@Override
	public void ajouterIntervenant(Intervenant cli) {
		// TODO Auto-generated method stub
		dao.ajouterIntervenant(cli);
	}

	@Override
	public void supprimerIntervenant(Long id) {
		// TODO Auto-generated method stub
		dao.supprimerIntervenant(id);
	}

	@Override
	public List<Intervenant> listIntervenant() {
		// TODO Auto-generated method stub
		return dao.listIntervenant();
	}

	@Override
	public Intervenant getIntervenant(Long id) {
		// TODO Auto-generated method stub
		return dao.getIntervenant(id);
	}

	@Override
	public void modifierReparation(DemandeReparation rep) {
		// TODO Auto-generated method stub
		dao.modifierReparation(rep);
	}

	@Override
	public DemandeReparation getDemandeReparation(Long id) {
		// TODO Auto-generated method stub
		return dao.getDemandeReparation(id);
	}

	@Override
	public List<DemandeReparation> listDemandeReparation() {
		// TODO Auto-generated method stub
		return dao.listDemandeReparation();
	}

	@Override
	public List<DemandeReparation> getDemandeReparationByClient(Long idClient) {
		// TODO Auto-generated method stub
		return dao.getDemandeReparationByClient(idClient);
	}

	@Override
	public List<DemandeReparation> getDemandeReparationByIntervenent(
			Long idIntervenent) {
		// TODO Auto-generated method stub
		return dao.getDemandeReparationByIntervenent(idIntervenent);
	}

}
